# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fakenet-ng
_pkgname=flare-fakenet-ng
pkgver=314.7488ace
pkgrel=2
pkgdesc='Next Generation Dynamic Network Analysis Tool.'
groups=('blackarch' 'blackarch-malware' 'blackarch-networking'
        'blackarch-sniffer' 'blackarch-proxy')
arch=('any')
url='https://github.com/fireeye/flare-fakenet-ng'
license=('Apache')
depends=('python2' 'python2-dpkt' 'python2-pyopenssl' 'python2-dnspython'
         'python2-dnslib' 'python2-pydivert' 'python2-win_inet_pton'
         'python2-netfilterqueue' 'python2-pyftpdlib')
makedepends=('git')
source=("git+https://github.com/fireeye/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $_pkgname

  python2 setup.py build
}

package() {
  cd $_pkgname

  python2 setup.py install --root="$pkgdir" --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

